import  axios from  'axios'

export default class HisRegistration {
    static hisRegistration = null

    static getInstance(){
        if(this.hisRegistration == null){
            this.hisRegistration = new HisRegistration()
        }
        return this.hisRegistration
    }


    getNumber(){
        return axios.get(`http://localhost/register/hisregistration/getNumber`)
    }

    /**
     * 拿到所有的科室
     * @returns {Promise<AxiosResponse<T>>}
     */
    departmentList(){
        return axios.get(`http://localhost/register/hisregistration/departmentList`)
    }

    /**
     * 拿到所有的医生
     * @returns {Promise<AxiosResponse<T>>}
     */
    dockerList(){
        return axios.get(`http://localhost/register/hisregistration/dockerList`)
    }

    list(params){
        return axios.get(`http://localhost/authority/mfyDocker/list`,{
            params:params
        })
    }

    add(aa){
        return axios.post(`http://localhost/register/hisregistration/save`,aa)
    }

    list2(params){
        return axios.get(`http://localhost/register/hisregistration/list`,{
            params:params
        })
    }


    getOne(registrationId){
        return axios.get(`http://localhost/register/hisregistration/${registrationId}`)
    }

}
